home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / develop™ Technical Journal / develop Issue 15 code / Floating Windows.sea / Floating Windows / Floating Windows Code / Shell Code / trapAvail.c < prev    next >
MacBinary  |  1994-08-27  |  1.5 KB  |  [TEXT/MMCC]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Fri Aug 26 21:22:41 1994, modified Fri Aug 26 21:22:41 1994, creator 'MMCC', type ASCII, 821 bytes "trapAvail.c" , at 0x3b5 456 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MMCC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 74 72 61 70 41 76 | 61 69 6c 2e 63 00 00 00 |..trapAv|ail.c...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 01 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 03 35 00 | 00 01 c8 aa 84 45 e1 aa |......5.|.....E..|
|00000060| 84 45 e1 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.E......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ea 6d 00 00 |........|.....m..|
|00000080| 2f 2a 0d 09 54 72 61 70 | 41 76 61 69 6c 20 d1 20 |/*..Trap|Avail . |
|00000090| 44 65 74 65 72 6d 69 6e | 65 20 74 68 65 20 65 78 |Determin|e the ex|
|000000a0| 69 73 74 65 6e 63 65 20 | 6f 66 20 61 20 74 72 61 |istence |of a tra|
|000000b0| 70 0d 2a 2f 0d 0d 23 69 | 6e 63 6c 75 64 65 20 3c |p.*/..#i|nclude <|
|000000c0| 54 79 70 65 73 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |Types.h>|.#includ|
|000000d0| 65 20 3c 54 72 61 70 73 | 2e 68 3e 0d 23 69 6e 63 |e <Traps|.h>.#inc|
|000000e0| 6c 75 64 65 20 3c 4f 53 | 55 74 69 6c 73 2e 68 3e |lude <OS|Utils.h>|
|000000f0| 0d 0d 73 68 6f 72 74 09 | 09 4e 75 6d 54 6f 6f 6c |..short.|.NumTool|
|00000100| 62 6f 78 54 72 61 70 73 | 28 76 6f 69 64 29 3b 0d |boxTraps|(void);.|
|00000110| 54 72 61 70 54 79 70 65 | 09 47 65 74 54 72 61 70 |TrapType|.GetTrap|
|00000120| 54 79 70 65 28 73 68 6f | 72 74 20 74 68 65 54 72 |Type(sho|rt theTr|
|00000130| 61 70 29 3b 0d 09 0d 42 | 6f 6f 6c 65 61 6e 09 54 |ap);...B|oolean.T|
|00000140| 72 61 70 41 76 61 69 6c | 61 62 6c 65 28 73 68 6f |rapAvail|able(sho|
|00000150| 72 74 20 74 68 65 54 72 | 61 70 29 3b 0d 42 6f 6f |rt theTr|ap);.Boo|
|00000160| 6c 65 61 6e 09 54 72 61 | 70 41 76 61 69 6c 61 62 |lean.Tra|pAvailab|
|00000170| 6c 65 28 73 68 6f 72 74 | 20 74 68 65 54 72 61 70 |le(short| theTrap|
|00000180| 29 0d 7b 0d 09 54 72 61 | 70 54 79 70 65 09 74 54 |).{..Tra|pType.tT|
|00000190| 79 70 65 3b 0d 09 42 6f | 6f 6c 65 61 6e 09 09 69 |ype;..Bo|olean..i|
|000001a0| 73 41 76 61 69 6c 3b 0d | 09 0d 09 74 54 79 70 65 |sAvail;.|...tType|
|000001b0| 20 3d 20 47 65 74 54 72 | 61 70 54 79 70 65 28 74 | = GetTr|apType(t|
|000001c0| 68 65 54 72 61 70 29 3b | 0d 09 69 66 20 28 74 54 |heTrap);|..if (tT|
|000001d0| 79 70 65 20 3d 3d 20 54 | 6f 6f 6c 54 72 61 70 29 |ype == T|oolTrap)|
|000001e0| 0d 09 09 7b 0d 09 09 09 | 74 68 65 54 72 61 70 20 |...{....|theTrap |
|000001f0| 26 3d 20 30 78 30 37 46 | 46 3b 0d 09 09 09 69 66 |&= 0x07F|F;....if|
|00000200| 20 28 74 68 65 54 72 61 | 70 20 3e 3d 20 4e 75 6d | (theTra|p >= Num|
|00000210| 54 6f 6f 6c 62 6f 78 54 | 72 61 70 73 28 29 29 0d |ToolboxT|raps()).|
|00000220| 09 09 09 09 74 68 65 54 | 72 61 70 20 3d 20 5f 55 |....theT|rap = _U|
|00000230| 6e 69 6d 70 6c 65 6d 65 | 6e 74 65 64 3b 0d 09 09 |nimpleme|nted;...|
|00000240| 7d 0d 09 0d 09 69 73 41 | 76 61 69 6c 20 3d 20 4e |}....isA|vail = N|
|00000250| 47 65 74 54 72 61 70 41 | 64 64 72 65 73 73 28 74 |GetTrapA|ddress(t|
|00000260| 68 65 54 72 61 70 2c 20 | 74 54 79 70 65 29 20 21 |heTrap, |tType) !|
|00000270| 3d 20 4e 47 65 74 54 72 | 61 70 41 64 64 72 65 73 |= NGetTr|apAddres|
|00000280| 73 28 5f 55 6e 69 6d 70 | 6c 65 6d 65 6e 74 65 64 |s(_Unimp|lemented|
|00000290| 2c 20 54 6f 6f 6c 54 72 | 61 70 29 3b 0d 09 72 65 |, ToolTr|ap);..re|
|000002a0| 74 75 72 6e 20 69 73 41 | 76 61 69 6c 3b 0d 7d 0d |turn isA|vail;.}.|
|000002b0| 0d 73 68 6f 72 74 09 4e | 75 6d 54 6f 6f 6c 62 6f |.short.N|umToolbo|
|000002c0| 78 54 72 61 70 73 28 29 | 0d 7b 0d 09 69 66 20 28 |xTraps()|.{..if (|
|000002d0| 4e 47 65 74 54 72 61 70 | 41 64 64 72 65 73 73 28 |NGetTrap|Address(|
|000002e0| 5f 49 6e 69 74 47 72 61 | 66 2c 20 54 6f 6f 6c 54 |_InitGra|f, ToolT|
|000002f0| 72 61 70 29 20 3d 3d 20 | 4e 47 65 74 54 72 61 70 |rap) == |NGetTrap|
|00000300| 41 64 64 72 65 73 73 28 | 30 78 41 41 36 45 2c 54 |Address(|0xAA6E,T|
|00000310| 6f 6f 6c 54 72 61 70 29 | 29 0d 09 09 72 65 74 75 |oolTrap)|)...retu|
|00000320| 72 6e 20 30 78 30 32 30 | 30 3b 0d 09 65 6c 73 65 |rn 0x020|0;..else|
|00000330| 0d 09 09 72 65 74 75 72 | 6e 20 30 78 30 34 30 30 |...retur|n 0x0400|
|00000340| 3b 0d 7d 0d 0d 54 72 61 | 70 54 79 70 65 09 47 65 |;.}..Tra|pType.Ge|
|00000350| 74 54 72 61 70 54 79 70 | 65 28 73 68 6f 72 74 20 |tTrapTyp|e(short |
|00000360| 74 68 65 54 72 61 70 29 | 0d 7b 0d 09 69 66 20 28 |theTrap)|.{..if (|
|00000370| 28 74 68 65 54 72 61 70 | 20 26 20 30 78 30 38 30 |(theTrap| & 0x080|
|00000380| 30 29 20 3e 20 30 29 0d | 09 09 72 65 74 75 72 6e |0) > 0).|..return|
|00000390| 20 54 6f 6f 6c 54 72 61 | 70 3b 0d 09 65 6c 73 65 | ToolTra|p;..else|
|000003a0| 0d 09 09 72 65 74 75 72 | 6e 20 4f 53 54 72 61 70 |...retur|n OSTrap|
|000003b0| 3b 0d 7d 0d 0d 00 00 00 | 00 00 00 00 00 00 00 00 |;.}.....|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 00 00 01 00 00 00 01 76 | 00 00 00 76 00 00 00 52 |.......v|...v...R|
|00000410| 74 55 70 4c 69 6d 69 74 | 73 28 29 0d 0d 2f 2a 0d |tUpLimit|s()../*.|
|00000420| 09 53 65 74 20 75 70 20 | 61 72 65 61 73 20 66 6f |.Set up |areas fo|
|00000430| 0b 74 72 61 70 41 76 61 | 69 6c 2e 63 02 00 00 00 |.trapAva|il.c....|
|00000440| 54 45 58 54 4d 4d 43 43 | 01 00 ff ff ff ff 00 00 |TEXTMMCC|........|
|00000450| 00 00 54 45 58 54 4d 4d | 43 43 01 00 ff ff ff ff |..TEXTMM|CC......|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 a3 88 6c 6a 00 00 | 03 35 00 00 01 c8 70 3b |....lj..|.5....p;|
|00000480| 0d 09 0d 09 64 65 73 6b | 54 6f 70 20 3d 20 47 65 |....desk|Top = Ge|
|00000490| 74 47 72 61 79 52 67 6e | 28 29 3b 0d 09 67 44 72 |tGrayRgn|();..gDr|
|000004a0| 61 67 41 72 65 61 20 3d | 20 28 2a 2a 64 65 73 6b |agArea =| (**desk|
|000004b0| 54 6f 70 29 2e 72 67 6e | 42 42 6f 78 3b 0d 09 53 |Top).rgn|BBox;..S|
|000004c0| 65 74 52 65 63 74 28 26 | 67 47 72 6f 77 42 6f 75 |etRect(&|gGrowBou|
|000004d0| 6e 64 73 2c 20 31 36 2c | 20 31 36 2c 0d 09 09 09 |nds, 16,| 16,....|
|000004e0| 28 28 67 44 72 61 67 41 | 72 65 61 2e 72 69 67 68 |((gDragA|rea.righ|
|000004f0| 74 29 20 2d 20 28 67 44 | 72 61 67 41 72 65 61 2e |t) - (gD|ragArea.|
|00000500| 00 00 00 1e 00 3d 00 04 | 01 a7 02 45 00 3d 00 04 |.....=..|...E.=..|
|00000510| 01 a7 02 45 00 00 00 00 | 00 00 00 00 00 00 00 00 |...E....|........|
|00000520| 00 00 00 00 00 48 00 0a | 43 6f 75 72 69 65 72 00 |.....H..|Courier.|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 3d 00 04 |........|.....=..|
|00000550| 01 dc 02 7c 00 3d 00 04 | 01 dc 02 7c ac 0f 40 b5 |...|.=..|...|..@.|
|00000560| 00 00 00 71 00 00 00 72 | 00 00 00 00 01 00 00 00 |...q...r|........|
|00000570| 00 04 00 01 00 01 00 00 | 01 00 00 00 01 76 00 00 |........|.....v..|
|00000580| 00 76 00 00 00 52 01 4a | 18 08 30 d8 00 00 00 1c |.v...R.J|..0.....|
|00000590| 00 52 00 01 4d 50 53 52 | 00 01 00 12 4d 57 42 42 |.R..MPSR|....MWBB|
|000005a0| 00 00 00 2a 03 f0 ff ff | 00 00 00 00 00 00 00 00 |...*....|........|
|000005b0| 03 ed ff ff 00 00 00 22 | 00 00 00 00 03 f0 ff ff |......."|........|
|000005c0| 00 00 00 6e 00 00 00 00 | 00 00 00 00 00 00 00 00 |...n....|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+